<template>
	<div class="app-container">
		<el-form size="small" inline>
			<el-form-item label="信用代码">
				<el-input v-model="query.corpCode" placeholder="信用代码" clearable />
			</el-form-item>
			<el-form-item label="组织名称">
				<el-input v-model="query.name" placeholder="组织名称" clearable />
			</el-form-item>
			<el-form-item>
				<el-button type="primary" icon="el-icon-search" @click="getList()">查询 </el-button>
				<el-button plain icon="el-icon-refresh" @click="handleReset()"> 重置 </el-button>
			</el-form-item>
		</el-form>
		<el-table border v-loading="loading" :data="list">
			<el-table-column label="序号" align="center" width="50" type="index" fixed="left" />
			<el-table-column
				label="统一社会信用代码"
				align="center"
				prop="corpCode"
				min-width="160"
				show-overflow-tooltip
				fixed="left"
			/>
			<el-table-column label="组织名称" align="center" prop="name" min-width="100" show-overflow-tooltip />
			<el-table-column label="住所" align="center" prop="address" min-width="120" show-overflow-tooltip />
			<el-table-column label="法定代表人姓名" align="center" prop="legalMan" min-width="120" />
			<el-table-column label="法定代表人证件号码" align="center" prop="idcardNumber" min-width="150" />
			<el-table-column label="成立日期" align="center" prop="establishTime" min-width="140" />
			<el-table-column label="发证日期" align="center" prop="certificateTime" min-width="140" />
			<el-table-column label="变更日期" align="center" prop="changeTime" min-width="140" />
			<el-table-column label="发证机关名称" align="center" prop="authorityName" min-width="100" show-overflow-tooltip />
			<el-table-column label="单位联系电话" align="center" prop="authorityPhone" min-width="100" />
			<el-table-column label="业务范围" align="center" prop="manageRange" min-width="100" show-overflow-tooltip />
			<el-table-column label="法定代表人手机" align="center" prop="phone" min-width="120" />
			<el-table-column label="成员人数" align="center" prop="peopleNum" min-width="90" />
			<el-table-column label="成员户数" align="center" prop="household" min-width="90" />
			<el-table-column label="改革类型" align="center" prop="reformType" min-width="100" />
			<el-table-column label="上级主管部门名称" align="center" prop="superiorAuthority" min-width="130" />
			<el-table-column label="是否实行会计委托代理" align="center" prop="proxy" min-width="160" />
			<el-table-column label="是否完成“村改居”" align="center" prop="isChange" min-width="130" />
			<el-table-column label="集体土地总面积" align="center" prop="allArea" min-width="120" />
			<el-table-column label="未承包到户农用地面积" align="center" prop="unuserArea" min-width="160" />
			<el-table-column label="资产总额" align="center" prop="totalAssets" min-width="100" />
			<el-table-column label="净资产总额" align="center" prop="totalNet" min-width="100" />
			<el-table-column label="其中资本" align="center" prop="capital" min-width="90" />
			<el-table-column label="股本总额" align="center" prop="totalCapital" min-width="90" />
			<el-table-column label="其中成员股本总额" align="center" prop="totalMember" min-width="140" />
			<el-table-column label="集体股本总额" align="center" prop="totalAll" min-width="100" />
		</el-table>
		<pagination
			v-show="total > 0"
			:total="total"
			:page.sync="query.pageNum"
			:limit.sync="query.pageSize"
			@pagination="getList"
		/>
	</div>
</template>

<script>
import villageApi from '@/api/manage/village'

export default {
	data() {
		return {
			loading: false,
			list: [],
			total: 0,
			query: {
				corpCode: '',
				name: '',
				pageNum: 1,
				pageSize: 10,
			},
		}
	},
	created() {
		this.getList()
	},
	methods: {
		getList() {
			this.loading = true
			villageApi.villageList(this.query).then((res) => {
				this.list = res.rows
				this.total = res.total
				this.loading = false
			})
		},
		handleReset() {
			this.query = {
				corpCode: '',
				name: '',
				pageNum: 1,
				pageSize: 10,
			}
			this.getList()
		},
	},
}
</script>

<style lang="scss" scoped></style>
